package com.example.service;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.example.util.PostManUtil;
import com.example.util.SandboxRun;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Description //TODO
 * @Date 2022/9/19 18:28
 * @Author lonng
 **/
@Service
public class PostProblemServiceImpl implements PostProblemService{

    public String sendProblem(String language,String requestBody,Integer timeLimit,Integer memoryLimit){
        return SandboxRun.getInstance().sendProblem(language,requestBody,timeLimit,memoryLimit);
    }

    @Override
    public String evaluatingProblem(String language,String fileId,
                                    Integer timeLimit, Integer memoryLimit,
                                    Integer stackLimit,String files) {
       SandboxRun sandboxRun=new SandboxRun();
       return SandboxRun.getInstance().evaluatingProblem(language,fileId,timeLimit,memoryLimit,stackLimit,files);
    }
}
